package io.github.mngsk.devicedetector.device;

import java.util.HashMap;
import java.util.Map;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;

@JsonDeserialize(builder = DeviceMixin.Builder.class)
public class DeviceMixin {

	public static class Builder {

		private static final Map<String, String> NUMERIC_TYPES;
		private static final Map<String, String> SHORT_BRAND_NAMES;

		static {
			NUMERIC_TYPES = new HashMap<>();
			NUMERIC_TYPES.put("0", "desktop");
			NUMERIC_TYPES.put("1", "smartphone");
			NUMERIC_TYPES.put("2", "tablet");
			NUMERIC_TYPES.put("3", "feature phone");
			NUMERIC_TYPES.put("4", "console");
			NUMERIC_TYPES.put("5", "tv");
			NUMERIC_TYPES.put("6", "car browser");
			NUMERIC_TYPES.put("7", "smart display");
			NUMERIC_TYPES.put("8", "camera");
			NUMERIC_TYPES.put("9", "portable media player");
			NUMERIC_TYPES.put("10", "phablet");
			NUMERIC_TYPES.put("11", "smart speaker");

			SHORT_BRAND_NAMES = new HashMap<>();
			SHORT_BRAND_NAMES.put("3Q", "3Q");
			SHORT_BRAND_NAMES.put("4G", "4Good");
			SHORT_BRAND_NAMES.put("AA", "AllCall");
			SHORT_BRAND_NAMES.put("AC", "Acer");
			SHORT_BRAND_NAMES.put("A9", "Advan");
			SHORT_BRAND_NAMES.put("AD", "Advance");
			SHORT_BRAND_NAMES.put("A3", "AGM");
			SHORT_BRAND_NAMES.put("AZ", "Ainol");
			SHORT_BRAND_NAMES.put("AI", "Airness");
			SHORT_BRAND_NAMES.put("0A", "AIS");
			SHORT_BRAND_NAMES.put("AW", "Aiwa");
			SHORT_BRAND_NAMES.put("AK", "Akai");
			SHORT_BRAND_NAMES.put("1A", "Alba");
			SHORT_BRAND_NAMES.put("AL", "Alcatel");
			SHORT_BRAND_NAMES.put("A2", "Allview");
			SHORT_BRAND_NAMES.put("A7", "Allwinner");
			SHORT_BRAND_NAMES.put("A1", "Altech UEC");
			SHORT_BRAND_NAMES.put("A5", "altron");
			SHORT_BRAND_NAMES.put("AN", "Arnova");
			SHORT_BRAND_NAMES.put("2A", "Atom");
			SHORT_BRAND_NAMES.put("KN", "Amazon");
			SHORT_BRAND_NAMES.put("AG", "AMGOO");
			SHORT_BRAND_NAMES.put("AO", "Amoi");
			SHORT_BRAND_NAMES.put("AP", "Apple");
			SHORT_BRAND_NAMES.put("AR", "Archos");
			SHORT_BRAND_NAMES.put("AS", "ARRIS");
			SHORT_BRAND_NAMES.put("AB", "Arian Space");
			SHORT_BRAND_NAMES.put("AT", "Airties");
			SHORT_BRAND_NAMES.put("A6", "Ark");
			SHORT_BRAND_NAMES.put("A4", "Ask");
			SHORT_BRAND_NAMES.put("A8", "Assistant");
			SHORT_BRAND_NAMES.put("A0", "ANS");
			SHORT_BRAND_NAMES.put("AU", "Asus");
			SHORT_BRAND_NAMES.put("AH", "AVH");
			SHORT_BRAND_NAMES.put("AV", "Avvio");
			SHORT_BRAND_NAMES.put("AX", "Audiovox");
			SHORT_BRAND_NAMES.put("AY", "Axxion");
			SHORT_BRAND_NAMES.put("AM", "Azumi Mobile");
			SHORT_BRAND_NAMES.put("BB", "BBK");
			SHORT_BRAND_NAMES.put("BE", "Becker");
			SHORT_BRAND_NAMES.put("B5", "Beeline");
			SHORT_BRAND_NAMES.put("BI", "Bird");
			SHORT_BRAND_NAMES.put("BT", "Bitel");
			SHORT_BRAND_NAMES.put("BG", "BGH");
			SHORT_BRAND_NAMES.put("BL", "Beetel");
			SHORT_BRAND_NAMES.put("BP", "Blaupunkt");
			SHORT_BRAND_NAMES.put("B3", "Bluboo");
			SHORT_BRAND_NAMES.put("BF", "Black Fox");
			SHORT_BRAND_NAMES.put("B6", "BDF");
			SHORT_BRAND_NAMES.put("BM", "Bmobile");
			SHORT_BRAND_NAMES.put("BN", "Barnes & Noble");
			SHORT_BRAND_NAMES.put("BO", "BangOlufsen");
			SHORT_BRAND_NAMES.put("BQ", "BenQ");
			SHORT_BRAND_NAMES.put("BS", "BenQ-Siemens");
			SHORT_BRAND_NAMES.put("BU", "Blu");
			SHORT_BRAND_NAMES.put("BD", "Bluegood");
			SHORT_BRAND_NAMES.put("B2", "Blackview");
			SHORT_BRAND_NAMES.put("B4", "bogo");
			SHORT_BRAND_NAMES.put("BW", "Boway");
			SHORT_BRAND_NAMES.put("BZ", "Bezkam");
			SHORT_BRAND_NAMES.put("BX", "bq");
			SHORT_BRAND_NAMES.put("BV", "Bravis");
			SHORT_BRAND_NAMES.put("BR", "Brondi");
			SHORT_BRAND_NAMES.put("B1", "Bush");
			SHORT_BRAND_NAMES.put("CB", "CUBOT");
			SHORT_BRAND_NAMES.put("CF", "Carrefour");
			SHORT_BRAND_NAMES.put("CP", "Captiva");
			SHORT_BRAND_NAMES.put("CS", "Casio");
			SHORT_BRAND_NAMES.put("R4", "Casper");
			SHORT_BRAND_NAMES.put("CA", "Cat");
			SHORT_BRAND_NAMES.put("C9", "CAGI");
			SHORT_BRAND_NAMES.put("CE", "Celkon");
			SHORT_BRAND_NAMES.put("CC", "ConCorde");
			SHORT_BRAND_NAMES.put("C2", "Changhong");
			SHORT_BRAND_NAMES.put("2C", "Ghong");
			SHORT_BRAND_NAMES.put("CH", "Cherry Mobile");
			SHORT_BRAND_NAMES.put("1C", "Chuwi");
			SHORT_BRAND_NAMES.put("L8", "Clarmin");
			SHORT_BRAND_NAMES.put("CK", "Cricket");
			SHORT_BRAND_NAMES.put("C1", "Crosscall");
			SHORT_BRAND_NAMES.put("CL", "Compal");
			SHORT_BRAND_NAMES.put("CN", "CnM");
			SHORT_BRAND_NAMES.put("CM", "Crius Mea");
			SHORT_BRAND_NAMES.put("C3", "China Mobile");
			SHORT_BRAND_NAMES.put("CR", "CreNova");
			SHORT_BRAND_NAMES.put("CT", "Capitel");
			SHORT_BRAND_NAMES.put("CQ", "Compaq");
			SHORT_BRAND_NAMES.put("CO", "Coolpad");
			SHORT_BRAND_NAMES.put("C5", "Condor");
			SHORT_BRAND_NAMES.put("CW", "Cowon");
			SHORT_BRAND_NAMES.put("CU", "Cube");
			SHORT_BRAND_NAMES.put("CY", "Coby Kyros");
			SHORT_BRAND_NAMES.put("C6", "Comio");
			SHORT_BRAND_NAMES.put("C7", "ComTrade Tesla");
			SHORT_BRAND_NAMES.put("C8", "Concord");
			SHORT_BRAND_NAMES.put("CX", "Crescent");
			SHORT_BRAND_NAMES.put("C4", "Cyrus");
			SHORT_BRAND_NAMES.put("CV", "CVTE");
			SHORT_BRAND_NAMES.put("DA", "Danew");
			SHORT_BRAND_NAMES.put("DT", "Datang");
			SHORT_BRAND_NAMES.put("D1", "Datsun");
			SHORT_BRAND_NAMES.put("DE", "Denver");
			SHORT_BRAND_NAMES.put("DX", "DEXP");
			SHORT_BRAND_NAMES.put("DS", "Desay");
			SHORT_BRAND_NAMES.put("DB", "Dbtel");
			SHORT_BRAND_NAMES.put("DC", "DoCoMo");
			SHORT_BRAND_NAMES.put("DG", "Dialog");
			SHORT_BRAND_NAMES.put("DI", "Dicam");
			SHORT_BRAND_NAMES.put("D4", "Digi");
			SHORT_BRAND_NAMES.put("D3", "Digicel");
			SHORT_BRAND_NAMES.put("DD", "Digiland");
			SHORT_BRAND_NAMES.put("D2", "Digma");
			SHORT_BRAND_NAMES.put("DL", "Dell");
			SHORT_BRAND_NAMES.put("DN", "DNS");
			SHORT_BRAND_NAMES.put("DM", "DMM");
			SHORT_BRAND_NAMES.put("DO", "Doogee");
			SHORT_BRAND_NAMES.put("DV", "Doov");
			SHORT_BRAND_NAMES.put("DP", "Dopod");
			SHORT_BRAND_NAMES.put("DR", "Doro");
			SHORT_BRAND_NAMES.put("DU", "Dune HD");
			SHORT_BRAND_NAMES.put("EB", "E-Boda");
			SHORT_BRAND_NAMES.put("EA", "EBEST");
			SHORT_BRAND_NAMES.put("EC", "Ericsson");
			SHORT_BRAND_NAMES.put("E7", "Ergo");
			SHORT_BRAND_NAMES.put("ED", "Energizer");
			SHORT_BRAND_NAMES.put("E4", "Echo Mobiles");
			SHORT_BRAND_NAMES.put("ES", "ECS");
			SHORT_BRAND_NAMES.put("E6", "EE");
			SHORT_BRAND_NAMES.put("EI", "Ezio");
			SHORT_BRAND_NAMES.put("EM", "Eks Mobility");
			SHORT_BRAND_NAMES.put("EL", "Elephone");
			SHORT_BRAND_NAMES.put("EG", "Elenberg");
			SHORT_BRAND_NAMES.put("EP", "Easypix");
			SHORT_BRAND_NAMES.put("EK", "EKO");
			SHORT_BRAND_NAMES.put("E1", "Energy Sistem");
			SHORT_BRAND_NAMES.put("ER", "Ericy");
			SHORT_BRAND_NAMES.put("EE", "Essential");
			SHORT_BRAND_NAMES.put("EN", "Eton");
			SHORT_BRAND_NAMES.put("E2", "Essentielb");
			SHORT_BRAND_NAMES.put("1E", "Etuline");
			SHORT_BRAND_NAMES.put("ET", "eTouch");
			SHORT_BRAND_NAMES.put("EV", "Evertek");
			SHORT_BRAND_NAMES.put("E3", "Evolio");
			SHORT_BRAND_NAMES.put("EO", "Evolveo");
			SHORT_BRAND_NAMES.put("EX", "Explay");
			SHORT_BRAND_NAMES.put("E0", "EvroMedia");
			SHORT_BRAND_NAMES.put("E5", "Extrem");
			SHORT_BRAND_NAMES.put("EZ", "Ezze");
			SHORT_BRAND_NAMES.put("E8", "E-tel");
			SHORT_BRAND_NAMES.put("E9", "Evercoss");
			SHORT_BRAND_NAMES.put("EU", "Eurostar");
			SHORT_BRAND_NAMES.put("FA", "Fairphone");
			SHORT_BRAND_NAMES.put("FM", "Famoco");
			SHORT_BRAND_NAMES.put("FE", "Fengxiang");
			SHORT_BRAND_NAMES.put("FI", "FiGO");
			SHORT_BRAND_NAMES.put("FL", "Fly");
			SHORT_BRAND_NAMES.put("F1", "FinePower");
			SHORT_BRAND_NAMES.put("FT", "Freetel");
			SHORT_BRAND_NAMES.put("FR", "Forstar");
			SHORT_BRAND_NAMES.put("FO", "Foxconn");
			SHORT_BRAND_NAMES.put("F2", "FORME");
			SHORT_BRAND_NAMES.put("FN", "FNB");
			SHORT_BRAND_NAMES.put("FU", "Fujitsu");
			SHORT_BRAND_NAMES.put("FD", "Fondi");
			SHORT_BRAND_NAMES.put("GT", "G-TiDE");
			SHORT_BRAND_NAMES.put("GM", "Garmin-Asus");
			SHORT_BRAND_NAMES.put("GA", "Gateway");
			SHORT_BRAND_NAMES.put("GD", "Gemini");
			SHORT_BRAND_NAMES.put("GN", "General Mobile");
			SHORT_BRAND_NAMES.put("GE", "Geotel");
			SHORT_BRAND_NAMES.put("GH", "Ghia");
			SHORT_BRAND_NAMES.put("GI", "Gionee");
			SHORT_BRAND_NAMES.put("GG", "Gigabyte");
			SHORT_BRAND_NAMES.put("GS", "Gigaset");
			SHORT_BRAND_NAMES.put("GZ", "Ginzzu");
			SHORT_BRAND_NAMES.put("G4", "Globex");
			SHORT_BRAND_NAMES.put("GC", "GOCLEVER");
			SHORT_BRAND_NAMES.put("GL", "Goly");
			SHORT_BRAND_NAMES.put("GO", "Google");
			SHORT_BRAND_NAMES.put("G1", "GoMobile");
			SHORT_BRAND_NAMES.put("GR", "Gradiente");
			SHORT_BRAND_NAMES.put("GP", "Grape");
			SHORT_BRAND_NAMES.put("GU", "Grundig");
			SHORT_BRAND_NAMES.put("HF", "Hafury");
			SHORT_BRAND_NAMES.put("HA", "Haier");
			SHORT_BRAND_NAMES.put("HS", "Hasee");
			SHORT_BRAND_NAMES.put("HE", "HannSpree");
			SHORT_BRAND_NAMES.put("HI", "Hisense");
			SHORT_BRAND_NAMES.put("HL", "Hi-Level");
			SHORT_BRAND_NAMES.put("H2", "Highscreen");
			SHORT_BRAND_NAMES.put("H1", "Hoffmann");
			SHORT_BRAND_NAMES.put("HM", "Homtom");
			SHORT_BRAND_NAMES.put("HO", "Hosin");
			SHORT_BRAND_NAMES.put("HZ", "Hoozo");
			SHORT_BRAND_NAMES.put("HP", "HP");
			SHORT_BRAND_NAMES.put("HT", "HTC");
			SHORT_BRAND_NAMES.put("HU", "Huawei");
			SHORT_BRAND_NAMES.put("HX", "Humax");
			SHORT_BRAND_NAMES.put("HY", "Hyrican");
			SHORT_BRAND_NAMES.put("HN", "Hyundai");
			SHORT_BRAND_NAMES.put("IA", "Ikea");
			SHORT_BRAND_NAMES.put("IB", "iBall");
			SHORT_BRAND_NAMES.put("IJ", "i-Joy");
			SHORT_BRAND_NAMES.put("IY", "iBerry");
			SHORT_BRAND_NAMES.put("IH", "iHunt");
			SHORT_BRAND_NAMES.put("IK", "iKoMo");
			SHORT_BRAND_NAMES.put("IE", "iView");
			SHORT_BRAND_NAMES.put("IM", "i-mate");
			SHORT_BRAND_NAMES.put("I1", "iOcean");
			SHORT_BRAND_NAMES.put("I2", "IconBIT");
			SHORT_BRAND_NAMES.put("IL", "IMO Mobile");
			SHORT_BRAND_NAMES.put("I7", "iLA");
			SHORT_BRAND_NAMES.put("IW", "iNew");
			SHORT_BRAND_NAMES.put("IP", "iPro");
			SHORT_BRAND_NAMES.put("IF", "Infinix");
			SHORT_BRAND_NAMES.put("I0", "InFocus");
			SHORT_BRAND_NAMES.put("I5", "InnJoo");
			SHORT_BRAND_NAMES.put("IN", "Innostream");
			SHORT_BRAND_NAMES.put("IS", "Insignia");
			SHORT_BRAND_NAMES.put("I4", "Inoi");
			SHORT_BRAND_NAMES.put("IR", "iRola");
			SHORT_BRAND_NAMES.put("IU", "iRulu");
			SHORT_BRAND_NAMES.put("I6", "Irbis");
			SHORT_BRAND_NAMES.put("II", "Inkti");
			SHORT_BRAND_NAMES.put("IX", "Intex");
			SHORT_BRAND_NAMES.put("IO", "i-mobile");
			SHORT_BRAND_NAMES.put("IQ", "INQ");
			SHORT_BRAND_NAMES.put("IT", "Intek");
			SHORT_BRAND_NAMES.put("IV", "Inverto");
			SHORT_BRAND_NAMES.put("I3", "Impression");
			SHORT_BRAND_NAMES.put("IZ", "iTel");
			SHORT_BRAND_NAMES.put("I9", "iZotron");
			SHORT_BRAND_NAMES.put("JA", "JAY-Tech");
			SHORT_BRAND_NAMES.put("JI", "Jiayu");
			SHORT_BRAND_NAMES.put("JO", "Jolla");
			SHORT_BRAND_NAMES.put("J5", "Just5");
			SHORT_BRAND_NAMES.put("KL", "Kalley");
			SHORT_BRAND_NAMES.put("K4", "Kaan");
			SHORT_BRAND_NAMES.put("KA", "Karbonn");
			SHORT_BRAND_NAMES.put("K5", "KATV1");
			SHORT_BRAND_NAMES.put("KD", "KDDI");
			SHORT_BRAND_NAMES.put("K1", "Kiano");
			SHORT_BRAND_NAMES.put("KI", "Kingsun");
			SHORT_BRAND_NAMES.put("KC", "Kocaso");
			SHORT_BRAND_NAMES.put("KG", "Kogan");
			SHORT_BRAND_NAMES.put("KO", "Konka");
			SHORT_BRAND_NAMES.put("KM", "Komu");
			SHORT_BRAND_NAMES.put("KB", "Koobee");
			SHORT_BRAND_NAMES.put("KT", "K-Touch");
			SHORT_BRAND_NAMES.put("KH", "KT-Tech");
			SHORT_BRAND_NAMES.put("KK", "Kodak");
			SHORT_BRAND_NAMES.put("KP", "KOPO");
			SHORT_BRAND_NAMES.put("KW", "Konrow");
			SHORT_BRAND_NAMES.put("KR", "Koridy");
			SHORT_BRAND_NAMES.put("K2", "KRONO");
			SHORT_BRAND_NAMES.put("KS", "Kempler & Strauss");
			SHORT_BRAND_NAMES.put("K3", "Keneksi");
			SHORT_BRAND_NAMES.put("KU", "Kumai");
			SHORT_BRAND_NAMES.put("KY", "Kyocera");
			SHORT_BRAND_NAMES.put("KZ", "Kazam");
			SHORT_BRAND_NAMES.put("KE", "Krüger&Matz");
			SHORT_BRAND_NAMES.put("LQ", "LAIQ");
			SHORT_BRAND_NAMES.put("L2", "Landvo");
			SHORT_BRAND_NAMES.put("L6", "Land Rover");
			SHORT_BRAND_NAMES.put("LV", "Lava");
			SHORT_BRAND_NAMES.put("LA", "Lanix");
			SHORT_BRAND_NAMES.put("LK", "Lark");
			SHORT_BRAND_NAMES.put("LC", "LCT");
			SHORT_BRAND_NAMES.put("L5", "Leagoo");
			SHORT_BRAND_NAMES.put("LD", "Ledstar");
			SHORT_BRAND_NAMES.put("L1", "LeEco");
			SHORT_BRAND_NAMES.put("L4", "Lemhoov");
			SHORT_BRAND_NAMES.put("LE", "Lenovo");
			SHORT_BRAND_NAMES.put("LN", "Lenco");
			SHORT_BRAND_NAMES.put("LT", "Leotec");
			SHORT_BRAND_NAMES.put("L7", "Lephone");
			SHORT_BRAND_NAMES.put("LP", "Le Pan");
			SHORT_BRAND_NAMES.put("LG", "LG");
			SHORT_BRAND_NAMES.put("LI", "Lingwin");
			SHORT_BRAND_NAMES.put("LO", "Loewe");
			SHORT_BRAND_NAMES.put("LM", "Logicom");
			SHORT_BRAND_NAMES.put("L3", "Lexand");
			SHORT_BRAND_NAMES.put("LX", "Lexibook");
			SHORT_BRAND_NAMES.put("LY", "LYF");
			SHORT_BRAND_NAMES.put("LU", "Lumus");
			SHORT_BRAND_NAMES.put("MN", "M4tel");
			SHORT_BRAND_NAMES.put("MJ", "Majestic");
			SHORT_BRAND_NAMES.put("MA", "Manta Multimedia");
			SHORT_BRAND_NAMES.put("5M", "Mann");
			SHORT_BRAND_NAMES.put("2M", "Masstel");
			SHORT_BRAND_NAMES.put("MW", "Maxwest");
			SHORT_BRAND_NAMES.put("M0", "Maze");
			SHORT_BRAND_NAMES.put("MB", "Mobistel");
			SHORT_BRAND_NAMES.put("0M", "Mecool");
			SHORT_BRAND_NAMES.put("M3", "Mecer");
			SHORT_BRAND_NAMES.put("MD", "Medion");
			SHORT_BRAND_NAMES.put("M2", "MEEG");
			SHORT_BRAND_NAMES.put("M1", "Meizu");
			SHORT_BRAND_NAMES.put("3M", "Meitu");
			SHORT_BRAND_NAMES.put("ME", "Metz");
			SHORT_BRAND_NAMES.put("MX", "MEU");
			SHORT_BRAND_NAMES.put("MI", "MicroMax");
			SHORT_BRAND_NAMES.put("M5", "MIXC");
			SHORT_BRAND_NAMES.put("MH", "Mobiola");
			SHORT_BRAND_NAMES.put("4M", "Mobicel");
			SHORT_BRAND_NAMES.put("M6", "Mobiistar");
			SHORT_BRAND_NAMES.put("MC", "Mediacom");
			SHORT_BRAND_NAMES.put("MK", "MediaTek");
			SHORT_BRAND_NAMES.put("MO", "Mio");
			SHORT_BRAND_NAMES.put("M7", "Miray");
			SHORT_BRAND_NAMES.put("MM", "Mpman");
			SHORT_BRAND_NAMES.put("M4", "Modecom");
			SHORT_BRAND_NAMES.put("MF", "Mofut");
			SHORT_BRAND_NAMES.put("MR", "Motorola");
			SHORT_BRAND_NAMES.put("MV", "Movic");
			SHORT_BRAND_NAMES.put("MS", "Microsoft");
			SHORT_BRAND_NAMES.put("M9", "MTC");
			SHORT_BRAND_NAMES.put("MP", "MegaFon");
			SHORT_BRAND_NAMES.put("MZ", "MSI");
			SHORT_BRAND_NAMES.put("MU", "Memup");
			SHORT_BRAND_NAMES.put("MT", "Mitsubishi");
			SHORT_BRAND_NAMES.put("ML", "MLLED");
			SHORT_BRAND_NAMES.put("MQ", "M.T.T.");
			SHORT_BRAND_NAMES.put("N4", "MTN");
			SHORT_BRAND_NAMES.put("MY", "MyPhone");
			SHORT_BRAND_NAMES.put("1M", "MYFON");
			SHORT_BRAND_NAMES.put("MG", "MyWigo");
			SHORT_BRAND_NAMES.put("M8", "Myria");
			SHORT_BRAND_NAMES.put("N3", "Navon");
			SHORT_BRAND_NAMES.put("N5", "NOA");
			SHORT_BRAND_NAMES.put("NE", "NEC");
			SHORT_BRAND_NAMES.put("NF", "Neffos");
			SHORT_BRAND_NAMES.put("NA", "Netgear");
			SHORT_BRAND_NAMES.put("NU", "NeuImage");
			SHORT_BRAND_NAMES.put("NG", "NGM");
			SHORT_BRAND_NAMES.put("NZ", "NG Optics");
			SHORT_BRAND_NAMES.put("N6", "Nobby");
			SHORT_BRAND_NAMES.put("NO", "Nous");
			SHORT_BRAND_NAMES.put("NI", "Nintendo");
			SHORT_BRAND_NAMES.put("N1", "Noain");
			SHORT_BRAND_NAMES.put("N2", "Nextbit");
			SHORT_BRAND_NAMES.put("NK", "Nokia");
			SHORT_BRAND_NAMES.put("NV", "Nvidia");
			SHORT_BRAND_NAMES.put("NB", "Noblex");
			SHORT_BRAND_NAMES.put("NM", "Nomi");
			SHORT_BRAND_NAMES.put("NL", "NUU Mobile");
			SHORT_BRAND_NAMES.put("NY", "NYX Mobile");
			SHORT_BRAND_NAMES.put("NN", "Nikon");
			SHORT_BRAND_NAMES.put("NW", "Newgen");
			SHORT_BRAND_NAMES.put("NX", "Nexian");
			SHORT_BRAND_NAMES.put("NT", "NextBook");
			SHORT_BRAND_NAMES.put("O3", "O+");
			SHORT_BRAND_NAMES.put("OB", "Obi");
			SHORT_BRAND_NAMES.put("O1", "Odys");
			SHORT_BRAND_NAMES.put("OD", "Onda");
			SHORT_BRAND_NAMES.put("ON", "OnePlus");
			SHORT_BRAND_NAMES.put("OP", "OPPO");
			SHORT_BRAND_NAMES.put("OR", "Orange");
			SHORT_BRAND_NAMES.put("OS", "Ordissimo");
			SHORT_BRAND_NAMES.put("OT", "O2");
			SHORT_BRAND_NAMES.put("OK", "Ouki");
			SHORT_BRAND_NAMES.put("OU", "OUYA");
			SHORT_BRAND_NAMES.put("OO", "Opsson");
			SHORT_BRAND_NAMES.put("OV", "Overmax");
			SHORT_BRAND_NAMES.put("OY", "Oysters");
			SHORT_BRAND_NAMES.put("OW", "öwn");
			SHORT_BRAND_NAMES.put("PN", "Panacom");
			SHORT_BRAND_NAMES.put("PA", "Panasonic");
			SHORT_BRAND_NAMES.put("PB", "PCBOX");
			SHORT_BRAND_NAMES.put("PC", "PCD");
			SHORT_BRAND_NAMES.put("PD", "PCD Argentina");
			SHORT_BRAND_NAMES.put("PE", "PEAQ");
			SHORT_BRAND_NAMES.put("PG", "Pentagram");
			SHORT_BRAND_NAMES.put("PH", "Philips");
			SHORT_BRAND_NAMES.put("PI", "Pioneer");
			SHORT_BRAND_NAMES.put("PX", "Pixus");
			SHORT_BRAND_NAMES.put("PL", "Polaroid");
			SHORT_BRAND_NAMES.put("P5", "Polytron");
			SHORT_BRAND_NAMES.put("P9", "Primepad");
			SHORT_BRAND_NAMES.put("PM", "Palm");
			SHORT_BRAND_NAMES.put("PO", "phoneOne");
			SHORT_BRAND_NAMES.put("PT", "Pantech");
			SHORT_BRAND_NAMES.put("PY", "Ployer");
			SHORT_BRAND_NAMES.put("P4", "Plum");
			SHORT_BRAND_NAMES.put("PV", "Point of View");
			SHORT_BRAND_NAMES.put("PP", "PolyPad");
			SHORT_BRAND_NAMES.put("P2", "Pomp");
			SHORT_BRAND_NAMES.put("P3", "PPTV");
			SHORT_BRAND_NAMES.put("PS", "Positivo");
			SHORT_BRAND_NAMES.put("PR", "Prestigio");
			SHORT_BRAND_NAMES.put("P1", "ProScan");
			SHORT_BRAND_NAMES.put("PU", "PULID");
			SHORT_BRAND_NAMES.put("QI", "Qilive");
			SHORT_BRAND_NAMES.put("QT", "Qtek");
			SHORT_BRAND_NAMES.put("QH", "Q-Touch");
			SHORT_BRAND_NAMES.put("QM", "QMobile");
			SHORT_BRAND_NAMES.put("QA", "Quantum");
			SHORT_BRAND_NAMES.put("QU", "Quechua");
			SHORT_BRAND_NAMES.put("QO", "Qumo");
			SHORT_BRAND_NAMES.put("RA", "Ramos");
			SHORT_BRAND_NAMES.put("RC", "RCA Tablets");
			SHORT_BRAND_NAMES.put("RB", "Readboy");
			SHORT_BRAND_NAMES.put("RI", "Rikomagic");
			SHORT_BRAND_NAMES.put("RN", "Rinno");
			SHORT_BRAND_NAMES.put("RV", "Riviera");
			SHORT_BRAND_NAMES.put("RM", "RIM");
			SHORT_BRAND_NAMES.put("RK", "Roku");
			SHORT_BRAND_NAMES.put("RO", "Rover");
			SHORT_BRAND_NAMES.put("R6", "RoverPad");
			SHORT_BRAND_NAMES.put("RR", "Roadrover");
			SHORT_BRAND_NAMES.put("R1", "Rokit");
			SHORT_BRAND_NAMES.put("R3", "Rombica");
			SHORT_BRAND_NAMES.put("RT", "RT Project");
			SHORT_BRAND_NAMES.put("RX", "Ritmix");
			SHORT_BRAND_NAMES.put("R5", "Ross&Moor");
			SHORT_BRAND_NAMES.put("R2", "R-TV");
			SHORT_BRAND_NAMES.put("SQ", "Santin BiTBiZ");
			SHORT_BRAND_NAMES.put("SA", "Samsung");
			SHORT_BRAND_NAMES.put("S0", "Sanei");
			SHORT_BRAND_NAMES.put("SD", "Sega");
			SHORT_BRAND_NAMES.put("SL", "Selfix");
			SHORT_BRAND_NAMES.put("SE", "Sony Ericsson");
			SHORT_BRAND_NAMES.put("S1", "Sencor");
			SHORT_BRAND_NAMES.put("SF", "Softbank");
			SHORT_BRAND_NAMES.put("SX", "SFR");
			SHORT_BRAND_NAMES.put("SG", "Sagem");
			SHORT_BRAND_NAMES.put("SH", "Sharp");
			SHORT_BRAND_NAMES.put("3S", "Shuttle");
			SHORT_BRAND_NAMES.put("SI", "Siemens");
			SHORT_BRAND_NAMES.put("SJ", "Silent Circle");
			SHORT_BRAND_NAMES.put("1S", "Sigma");
			SHORT_BRAND_NAMES.put("SN", "Sendo");
			SHORT_BRAND_NAMES.put("S6", "Senseit");
			SHORT_BRAND_NAMES.put("EW", "Senwa");
			SHORT_BRAND_NAMES.put("SW", "Sky");
			SHORT_BRAND_NAMES.put("SK", "Skyworth");
			SHORT_BRAND_NAMES.put("SC", "Smartfren");
			SHORT_BRAND_NAMES.put("SO", "Sony");
			SHORT_BRAND_NAMES.put("OI", "Sonim");
			SHORT_BRAND_NAMES.put("SP", "Spice");
			SHORT_BRAND_NAMES.put("SU", "SuperSonic");
			SHORT_BRAND_NAMES.put("S5", "Supra");
			SHORT_BRAND_NAMES.put("SV", "Selevision");
			SHORT_BRAND_NAMES.put("SY", "Sanyo");
			SHORT_BRAND_NAMES.put("SM", "Symphony");
			SHORT_BRAND_NAMES.put("4S", "Syrox");
			SHORT_BRAND_NAMES.put("SR", "Smart");
			SHORT_BRAND_NAMES.put("S7", "Smartisan");
			SHORT_BRAND_NAMES.put("S4", "Star");
			SHORT_BRAND_NAMES.put("SB", "STF Mobile");
			SHORT_BRAND_NAMES.put("S8", "STK");
			SHORT_BRAND_NAMES.put("S9", "Savio");
			SHORT_BRAND_NAMES.put("2S", "Starway");
			SHORT_BRAND_NAMES.put("ST", "Storex");
			SHORT_BRAND_NAMES.put("S2", "Stonex");
			SHORT_BRAND_NAMES.put("S3", "SunVan");
			SHORT_BRAND_NAMES.put("SZ", "Sumvision");
			SHORT_BRAND_NAMES.put("SS", "SWISSMOBILITY");
			SHORT_BRAND_NAMES.put("10", "Simbans");
			SHORT_BRAND_NAMES.put("X1", "Safaricom");
			SHORT_BRAND_NAMES.put("TA", "Tesla");
			SHORT_BRAND_NAMES.put("T5", "TB Touch");
			SHORT_BRAND_NAMES.put("TC", "TCL");
			SHORT_BRAND_NAMES.put("T7", "Teclast");
			SHORT_BRAND_NAMES.put("TE", "Telit");
			SHORT_BRAND_NAMES.put("T4", "ThL");
			SHORT_BRAND_NAMES.put("TH", "TiPhone");
			SHORT_BRAND_NAMES.put("TB", "Tecno Mobile");
			SHORT_BRAND_NAMES.put("TP", "TechPad");
			SHORT_BRAND_NAMES.put("TD", "Tesco");
			SHORT_BRAND_NAMES.put("TI", "TIANYU");
			SHORT_BRAND_NAMES.put("TG", "Telego");
			SHORT_BRAND_NAMES.put("TL", "Telefunken");
			SHORT_BRAND_NAMES.put("T2", "Telenor");
			SHORT_BRAND_NAMES.put("TM", "T-Mobile");
			SHORT_BRAND_NAMES.put("TN", "Thomson");
			SHORT_BRAND_NAMES.put("TQ", "Timovi");
			SHORT_BRAND_NAMES.put("TY", "Tooky");
			SHORT_BRAND_NAMES.put("T1", "Tolino");
			SHORT_BRAND_NAMES.put("T9", "Top House");
			SHORT_BRAND_NAMES.put("TO", "Toplux");
			SHORT_BRAND_NAMES.put("T8", "Touchmate");
			SHORT_BRAND_NAMES.put("TS", "Toshiba");
			SHORT_BRAND_NAMES.put("TT", "TechnoTrend");
			SHORT_BRAND_NAMES.put("T6", "TrekStor");
			SHORT_BRAND_NAMES.put("T3", "Trevi");
			SHORT_BRAND_NAMES.put("TU", "Tunisie Telecom");
			SHORT_BRAND_NAMES.put("TR", "Turbo-X");
			SHORT_BRAND_NAMES.put("1T", "Turbo");
			SHORT_BRAND_NAMES.put("11", "True");
			SHORT_BRAND_NAMES.put("TV", "TVC");
			SHORT_BRAND_NAMES.put("TX", "TechniSat");
			SHORT_BRAND_NAMES.put("TZ", "teXet");
			SHORT_BRAND_NAMES.put("UC", "U.S. Cellular");
			SHORT_BRAND_NAMES.put("UH", "Uhappy");
			SHORT_BRAND_NAMES.put("UL", "Ulefone");
			SHORT_BRAND_NAMES.put("UO", "Unnecto");
			SHORT_BRAND_NAMES.put("UN", "Unowhy");
			SHORT_BRAND_NAMES.put("US", "Uniscope");
			SHORT_BRAND_NAMES.put("UX", "Unimax");
			SHORT_BRAND_NAMES.put("UM", "UMIDIGI");
			SHORT_BRAND_NAMES.put("UU", "Unonu");
			SHORT_BRAND_NAMES.put("UK", "UTOK");
			SHORT_BRAND_NAMES.put("UA", "Umax");
			SHORT_BRAND_NAMES.put("UT", "UTStarcom");
			SHORT_BRAND_NAMES.put("UZ", "Unihertz");
			SHORT_BRAND_NAMES.put("VA", "Vastking");
			SHORT_BRAND_NAMES.put("VD", "Videocon");
			SHORT_BRAND_NAMES.put("VE", "Vertu");
			SHORT_BRAND_NAMES.put("VN", "Venso");
			SHORT_BRAND_NAMES.put("V5", "Vivax");
			SHORT_BRAND_NAMES.put("VI", "Vitelcom");
			SHORT_BRAND_NAMES.put("V7", "Vinga");
			SHORT_BRAND_NAMES.put("VK", "VK Mobile");
			SHORT_BRAND_NAMES.put("VS", "ViewSonic");
			SHORT_BRAND_NAMES.put("VT", "Vestel");
			SHORT_BRAND_NAMES.put("VR", "Vernee");
			SHORT_BRAND_NAMES.put("V4", "Verizon");
			SHORT_BRAND_NAMES.put("VL", "Verykool");
			SHORT_BRAND_NAMES.put("V6", "VGO TEL");
			SHORT_BRAND_NAMES.put("VV", "Vivo");
			SHORT_BRAND_NAMES.put("VX", "Vertex");
			SHORT_BRAND_NAMES.put("V3", "Vinsoc");
			SHORT_BRAND_NAMES.put("V2", "Vonino");
			SHORT_BRAND_NAMES.put("VG", "Vorago");
			SHORT_BRAND_NAMES.put("V1", "Voto");
			SHORT_BRAND_NAMES.put("VO", "Voxtel");
			SHORT_BRAND_NAMES.put("VF", "Vodafone");
			SHORT_BRAND_NAMES.put("VZ", "Vizio");
			SHORT_BRAND_NAMES.put("VW", "Videoweb");
			SHORT_BRAND_NAMES.put("VU", "Vulcan");
			SHORT_BRAND_NAMES.put("WA", "Walton");
			SHORT_BRAND_NAMES.put("WF", "Wileyfox");
			SHORT_BRAND_NAMES.put("WN", "Wink");
			SHORT_BRAND_NAMES.put("WM", "Weimei");
			SHORT_BRAND_NAMES.put("WE", "WellcoM");
			SHORT_BRAND_NAMES.put("WY", "Wexler");
			SHORT_BRAND_NAMES.put("WI", "Wiko");
			SHORT_BRAND_NAMES.put("WP", "Wieppo");
			SHORT_BRAND_NAMES.put("WL", "Wolder");
			SHORT_BRAND_NAMES.put("WG", "Wolfgang");
			SHORT_BRAND_NAMES.put("WO", "Wonu");
			SHORT_BRAND_NAMES.put("W1", "Woo");
			SHORT_BRAND_NAMES.put("WX", "Woxter");
			SHORT_BRAND_NAMES.put("XV", "X-View");
			SHORT_BRAND_NAMES.put("XI", "Xiaomi");
			SHORT_BRAND_NAMES.put("XL", "Xiaolajiao");
			SHORT_BRAND_NAMES.put("XN", "Xion");
			SHORT_BRAND_NAMES.put("XO", "Xolo");
			SHORT_BRAND_NAMES.put("XR", "Xoro");
			SHORT_BRAND_NAMES.put("YA", "Yarvik");
			SHORT_BRAND_NAMES.put("YD", "Yandex");
			SHORT_BRAND_NAMES.put("Y2", "Yes");
			SHORT_BRAND_NAMES.put("YE", "Yezz");
			SHORT_BRAND_NAMES.put("Y1", "Yu");
			SHORT_BRAND_NAMES.put("YU", "Yuandao");
			SHORT_BRAND_NAMES.put("YS", "Yusun");
			SHORT_BRAND_NAMES.put("YT", "Ytone");
			SHORT_BRAND_NAMES.put("ZE", "Zeemi");
			SHORT_BRAND_NAMES.put("ZK", "Zenek");
			SHORT_BRAND_NAMES.put("ZO", "Zonda");
			SHORT_BRAND_NAMES.put("ZP", "Zopo");
			SHORT_BRAND_NAMES.put("ZT", "ZTE");
			SHORT_BRAND_NAMES.put("ZU", "Zuum");
			SHORT_BRAND_NAMES.put("ZN", "Zen");
			SHORT_BRAND_NAMES.put("ZY", "Zync");
			SHORT_BRAND_NAMES.put("ZQ", "ZYQ");
			SHORT_BRAND_NAMES.put("XT", "X-TIGI");
			SHORT_BRAND_NAMES.put("XB", "NEXBOX");

			// legacy brands, might be removed in future versions
			SHORT_BRAND_NAMES.put("WB", "Web TV");
			SHORT_BRAND_NAMES.put("XX", "Unknown");
		}

		private String type;
		private String brand;
		private String model;

		public Builder withType(String type) {
			if (type == null || type.trim().isEmpty()) {
				return this;
			}

			this.type = type.trim();
			if (NUMERIC_TYPES.containsKey(this.type)) {
				this.type = NUMERIC_TYPES.get(this.type);
			}

			return this;
		}

		public Builder withBrand(String brand) {
			if (brand == null || brand.trim().isEmpty()) {
				return this;
			}

			this.brand = brand.trim();
			if (SHORT_BRAND_NAMES.containsKey(this.brand)) {
				this.brand = SHORT_BRAND_NAMES.get(this.brand);
			}

			return this;
		}

		public Builder withModel(String model) {
			if (model == null || model.trim().isEmpty()) {
				return this;
			}

			this.model = model.trim();

			return this;
		}

		public Device build() {
			if (this.type == null || this.type.isEmpty()) {
				return null;
			}
			return new Device(this.type, this.brand, this.model);
		}

	}

}
